-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for -force-color
to the CLI.
#10975
Conversation
@jrasell Would appreciate a review. I have verified manually and it works, not to sure about tests. On the other hand I couldn't really find any for |
I am pretty sure that the CSI snapshot failures in the test are not my fault! ;) |
I does not yet seem to work in gitlab CI, mhm :/ That will be fun to figure out. |
Okay, so |
Fixed for this PR, should be ready for review now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this @apollo13 and sorry for the delay in reviewing. I have an line comment which I would appreciate your thoughts on.
Another comment which appears a couple of times would be to remove the (CI systems mainly)
statement in the help outputs. I'd prefer the user to understand why they need to use the flag, rather than read the help and maybe assume they can override because of the CI detail. Again I am open to opinions here.
8c94fe2
to
b636ea9
Compare
I have fixed up the flag defaults and it should work as expected now. If there are performance issues we have to reevaluate. |
b636ea9
to
24e99a5
Compare
@lgfa29 I have rebased this PR onto the latest no-color changes in main. While on it I have simplified the code because I like how my PR looks now because it only bothers about the flags and env variables in one place. Sadly this "one place" is main.go which probably makes this somewhat annoying to test. I do not really have an idea on how to fix this -- I am open for ideas :) I guess we could somewhat "fix" this by moving the creation of |
I have pushed a new commit with a |
@lgfa29 Any chance you could review this PR? :) |
Will do it in the coming days 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this great PR @apollo13!
It's great to see this logic being pulled out of main.go
since it's now easier to test it 🙂
I pushed a commit to change the logic slightly so that -no-color
takes precedence of -force-color
. These two options are meant to be used together, but in case they are it would be better to avoid colors since it's a safer option.
What do you think?
Personally I think that |
So now we need a Just kidding, or course. The reasoning behind I will merge this now then. Thank you for the contribution! |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This should fix #10973